const mongoose = require('mongoose');
const mongoConnectDB = require('../mondodb/connect')

const Schema = mongoose.Schema;

const workSchema = new Schema({
  userId: {
    type: String,
		required: true
  },
	type: String,
	width: Number,
	height: Number,
	canvasBg: String,
	imgUrl: String,
	name: String,
	components: []
}, {
	timestamps: true,
})

workSchema.set('autoIndex', false);

const lessWork = mongoConnectDB.model('lessWork', workSchema);

module.exports = lessWork;